package com.scuvc.service.impl;

import com.scuvc.entity.BrandInfo;
import com.scuvc.service.BrandInfoService;
import com.scuvc.utils.StaticUtils;

import java.util.List;


public class BrandInfoServiceImpl implements BrandInfoService {
    @Override
    public String[] getAllBrand() {
        List<BrandInfo> list =StaticUtils.brandInfoDao.getAllBrand();
        String[] bName = new String[list.size()];
        for(int i=0;i<list.size();i++){
            bName[i] = list.get(i).getBrand_name();
        }
        return bName;
    }

    @Override
    public Long getBrandId(String brand_name) {
        return StaticUtils.brandInfoDao.getBrandId(brand_name);
    }
}
